home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 4.9 KB | 222 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: Extensn.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * Classes defined in this interface
- *
- */
-
-
- #ifndef SOM_ODExtension_xh
- #define SOM_ODExtension_xh
-
- class ODExtension;
-
- #define ODExtension_MajorVersion 1
- #define ODExtension_MinorVersion 0
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_ODRefCntObject_xh
- #include <RefCtObj.xh>
- #endif
-
- #ifndef ODExtension_API
- #define ODExtension_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class ODFrame;
- class ODFacet;
- class ODObject;
- class ODExtension;
- class ODRefCntObject;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define ODExtensionCClassData ODExtensionClassData
- #define ODExtensionNewClass(major,minor) somNewVersionedClassReference(ODExtension,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define ODExtensionMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the ODExtension class object, and the methods it introduces. */
- SOMEXTERN struct ODExtensionClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken InitExtension;
- somMToken GetBase;
- somMToken BaseRemoved;
- somMToken IsValid;
- somMToken CheckValid;
- } SOMDLINK ODExtensionClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(ODExtension_Class_Source) && !defined(SOM_Module_extensn_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list ODExtensionClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for ODExtension Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_ODExtension_InitExtension)(ODExtension *somSelf, Environment *ev,
- ODObject* base);
- typedef ODObject* (* SOMLINK somTD_ODExtension_GetBase)(ODExtension *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODExtension_BaseRemoved)(ODExtension *somSelf, Environment *ev);
- typedef ODBoolean (* SOMLINK somTD_ODExtension_IsValid)(ODExtension *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODExtension_CheckValid)(ODExtension *somSelf, Environment *ev);
- }
-
- #endif /* ODExtension_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODExtension
- */
- class ODExtension : public ODRefCntObject
- {
- public:
-
- // ODExtension::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for ODExtension, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(ODExtension);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(ODExtension);
- #endif
- }
-
- // ODExtension::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitExtension */
- void InitExtension(Environment *ev,
- ODObject* base)
- {
- SOM_ResolveD(this,ODExtension,ODExtension,InitExtension)
- (this,ev,base);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetBase */
- ODObject* GetBase(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODObject* __somResult =
- SOM_ResolveD(this,ODExtension,ODExtension,GetBase)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODExtension,ODExtension,GetBase)
- (this,ev);
- #endif
- }
-
- /* method: BaseRemoved */
- void BaseRemoved(Environment *ev)
- {
- SOM_ResolveD(this,ODExtension,ODExtension,BaseRemoved)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: IsValid */
- ODBoolean IsValid(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODBoolean __somResult =
- SOM_ResolveD(this,ODExtension,ODExtension,IsValid)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODExtension,ODExtension,IsValid)
- (this,ev);
- #endif
- }
-
- /* method: CheckValid */
- void CheckValid(Environment *ev)
- {
- SOM_ResolveD(this,ODExtension,ODExtension,CheckValid)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* ODExtension */
-
-
-
- #endif /* SOM_ODExtension_xh */
-